<template>
	<div class="am-cf am-padding am-padding-bottom-0">
		<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">个人资料</strong> / <small>Personal information</small></div>
	</div>

	<hr/>

	<div class="am-g">
		<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8"></div>

		<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
			<form class="am-form am-form-horizontal">
				<div class="am-form-group">
					<label for="user-name" class="am-u-sm-3 am-form-label">姓名 / Name</label>
					<div class="am-u-sm-9">
						<input type="text" id="user-name" placeholder="姓名 / Name">
						<small>输入你的名字，让我们记住你。</small>
					</div>
				</div>

				<div class="am-form-group">
					<label for="user-email" class="am-u-sm-3 am-form-label">电子邮件 / Email</label>
					<div class="am-u-sm-9">
						<input type="email" id="user-email" placeholder="输入你的电子邮件 / Email">
						<small>邮箱你懂得...</small>
					</div>
				</div>

				<div class="am-form-group">
					<label for="user-phone" class="am-u-sm-3 am-form-label">电话 / Telephone</label>
					<div class="am-u-sm-9">
						<input type="tel" id="user-phone" placeholder="输入你的电话号码 / Telephone">
					</div>
				</div>

				<div class="am-form-group">
					<label for="user-QQ" class="am-u-sm-3 am-form-label">QQ</label>
					<div class="am-u-sm-9">
						<input type="number" pattern="[0-9]*" id="user-QQ" placeholder="输入你的QQ号码">
					</div>
				</div>

				<div class="am-form-group">
					<label for="user-weibo" class="am-u-sm-3 am-form-label">微博 / Twitter</label>
					<div class="am-u-sm-9">
						<input type="text" id="user-weibo" placeholder="输入你的微博 / Twitter">
					</div>
				</div>

				<div class="am-form-group">
					<label for="user-intro" class="am-u-sm-3 am-form-label">简介 / Intro</label>
					<div class="am-u-sm-9">
						<textarea class="" rows="5" id="user-intro" placeholder="输入个人简介"></textarea>
						<small>250字以内写出你的一生...</small>
					</div>
				</div>

				<div class="am-form-group">
					<div class="am-u-sm-9 am-u-sm-push-3">
						<button type="button" class="am-btn am-btn-primary">保存修改</button>
						<button type="button" class="am-btn am-btn-primary" v-on:click="abandon()">放弃保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</template>

<script>
	import utils from '../../../src/utils.js';

	export default {
		data: function() {
			return {
				pageNum: 0,
				pageSize: 0,
				pageTotal: 0,
				rowTotal: 0,
				infoList: []
			};
		},
		created: function() {
			this.load();
		},
		watch: {
			"reload": function(value) {
				if(value) {
					load(this);
					this.reload = false;
				}
			}
		},
		methods: {
			load: function() {
				/**
				var self = this ;
				utils.get('/data/list.json',{},function(rs){
					
					self.pageNum = rs.pageNum ;
					self.pageSize = rs.pageSize ;
					self.pageTotal = rs.pageTotal ;
					self.rowTotal = rs.rowTotal ;
					self.infoList = rs.infoList ;
										
				},null,function(rs){
					 
				});
				*/
			},
			logout: function() {
				utils.logout();
			},
			abandon: function() {
				console.info("abandon");
				this.$router.go('/admin/crud/list');
			}
		}
	}
</script>

<style>

</style>